Create tracked types to handle inactive input sources#167
Conversation
Docs previewBuilt docs for this PR are available at: https://NVIDIA.github.io/IsaacTeleop/preview/pr-167/ (It may take a minute to appear after the workflow completes.) |
dd81037 to
1ba0936
Compare
Docs previewBuilt docs for this PR are available at: https://NVIDIA.github.io/IsaacTeleop/preview/pr-167/ (It may take a minute to appear after the workflow completes.) |
There was a problem hiding this comment.
Pull request overview
This PR updates the DeviceIO tracking API to represent inactive input sources via new *TrackedT wrapper types (with a nullable .data), and aligns schema/types/tests/examples with that model (including renaming pedal output validity to is_active).
Changes:
- Add
*TrackedFlatBuffers tables and corresponding Python bindings that expose a nullable.datapayload when a source is inactive. - Update DeviceIO C++ trackers + pybind APIs to return tracked wrappers (and remove prior
is_activefields where applicable). - Update plugins, examples, and schema tests to use the new tracked-wrapper pattern and renamed pedal field.
Reviewed changes
Copilot reviewed 57 out of 57 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| src/plugins/manus/core/manus_hand_tracking_plugin.cpp | Switch controller access to tracked wrapper .data checks for injection timing/poses. |
| src/plugins/generic_3axis_pedal/generic_3axis_pedal_plugin.cpp | Rename pedal output flag from is_valid → is_active. |
| src/plugins/controller_synthetic_hands/synthetic_hands_plugin.cpp | Use controller tracked wrappers and guard reads on .data. |
| src/plugins/controller_synthetic_hands/README.md | Update documentation examples to use tracked wrappers (.data). |
| src/core/schema_tests/python/test_pedals.py | Update tests for Generic3AxisPedalOutput.is_active. |
| src/core/schema_tests/python/test_hand.py | Remove assertions/docs referencing removed HandPoseT.is_active. |
| src/core/schema_tests/python/test_full_body.py | Remove assertions/docs referencing removed FullBodyPosePicoT.is_active. |
| src/core/schema_tests/python/test_controller.py | Update ControllerSnapshot construction/expectations after removing is_active. |
| src/core/schema_tests/cpp/test_pedals.cpp | Update native tests for is_active and vtable constants. |
| src/core/schema_tests/cpp/test_hand.cpp | Remove vtable/type asserts and tests for removed HandPose.is_active. |
| src/core/schema_tests/cpp/test_full_body.cpp | Remove vtable/type asserts and tests for removed FullBodyPosePico.is_active. |
| src/core/schema_tests/cpp/test_controller.cpp | Update struct tests/serialization expectations after removing is_active. |
| src/core/schema/python/schema_init.py | Export newly added *TrackedT Python types. |
| src/core/schema/python/pedals_bindings.h | Bind is_active and add Generic3AxisPedalOutputTrackedT. |
| src/core/schema/python/oak_bindings.h | Add FrameMetadataTrackedT Python binding. |
| src/core/schema/python/locomotion_bindings.h | Add LocomotionCommandTrackedT Python binding. |
| src/core/schema/python/head_bindings.h | Add HeadPoseTrackedT Python binding. |
| src/core/schema/python/hand_bindings.h | Remove HandPoseT.is_active exposure and add HandPoseTrackedT. |
| src/core/schema/python/full_body_bindings.h | Remove FullBodyPosePicoT.is_active exposure and add FullBodyPosePicoTrackedT. |
| src/core/schema/python/controller_bindings.h | Remove ControllerSnapshot.is_active exposure and add ControllerSnapshotTrackedT. |
| src/core/schema/fbs/pedals.fbs | Rename is_valid → is_active; add Generic3AxisPedalOutputTracked. |
| src/core/schema/fbs/oak.fbs | Add FrameMetadataTracked. |
| src/core/schema/fbs/locomotion.fbs | Add LocomotionCommandTracked. |
| src/core/schema/fbs/head.fbs | Add HeadPoseTracked. |
| src/core/schema/fbs/hand.fbs | Remove is_active, renumber fields, and add HandPoseTracked. |
| src/core/schema/fbs/full_body.fbs | Remove is_active, renumber fields, and add FullBodyPosePicoTracked. |
| src/core/schema/fbs/controller.fbs | Remove is_active and add ControllerSnapshotTracked. |
| src/core/retargeting_engine_tests/python/test_sources.py | Update controller snapshot creation after signature change. |
| src/core/retargeting_engine/python/deviceio_source_nodes/hands_source.py | Accept `HandPoseT |
| src/core/retargeting_engine/python/deviceio_source_nodes/controllers_source.py | Accept `ControllerSnapshot |
| src/core/deviceio/python/deviceio_bindings.cpp | Update pybind query methods to return tracked wrappers. |
| src/core/deviceio/cpp/inc/deviceio/head_tracker.hpp | Change public API return type to HeadPoseTrackedT. |
| src/core/deviceio/cpp/inc/deviceio/hand_tracker.hpp | Change public API return type to HandPoseTrackedT and update internals. |
| src/core/deviceio/cpp/inc/deviceio/generic_3axis_pedal_tracker.hpp | Change public API return type to Generic3AxisPedalOutputTrackedT. |
| src/core/deviceio/cpp/inc/deviceio/full_body_tracker_pico.hpp | Change public API return type to FullBodyPosePicoTrackedT. |
| src/core/deviceio/cpp/inc/deviceio/frame_metadata_tracker_oak.hpp | Change public API return type to FrameMetadataTrackedT. |
| src/core/deviceio/cpp/inc/deviceio/controller_tracker.hpp | Change public API return type to ControllerSnapshotTrackedT. |
| src/core/deviceio/cpp/head_tracker.cpp | Implement tracked wrapper storage and updated serialization for head pose. |
| src/core/deviceio/cpp/hand_tracker.cpp | Implement tracked wrapper semantics (null on inactive) and updated serialization. |
| src/core/deviceio/cpp/generic_3axis_pedal_tracker.cpp | Wrap pedal output in tracked wrapper and reset .data when unavailable. |
| src/core/deviceio/cpp/full_body_tracker_pico.cpp | Wrap body pose in tracked wrapper and reset .data when inactive. |
| src/core/deviceio/cpp/frame_metadata_tracker_oak.cpp | Wrap metadata in tracked wrapper and update serialization behavior. |
| src/core/deviceio/cpp/controller_tracker.cpp | Wrap controller snapshots in tracked wrapper and reset .data when inactive. |
| examples/schemaio/pedal_pusher.cpp | Update pedal output field name to is_active. |
| examples/schemaio/pedal_printer.cpp | Update consumer to check tracked.data and dereference when present. |
| examples/schemaio/frame_metadata_printer.cpp | Update consumer to check tracked.data before printing. |
| examples/retargeting/python/sources_example.py | Update example to use tracked wrappers from DeviceIO. |
| examples/oxr/python/test_synthetic_hands.py | Update example to check .data is not None for hand activity. |
| examples/oxr/python/test_session_sharing.py | Update example to dereference tracked payloads. |
| examples/oxr/python/test_modular.py | Update modular test to use tracked wrappers and remove unused schema import. |
| examples/oxr/python/test_full_body_tracker.py | Update example to use tracked body pose wrapper. |
| examples/oxr/python/test_extensions.py | Update extension test to use tracked wrappers. |
| examples/oxr/python/test_controller_tracker.py | Update controller test to use tracked wrappers and guarded reads. |
| examples/oxr/python/modular_example.py | Update modular example to use tracked wrappers. |
| examples/oxr/cpp/oxr_simple_api_demo.cpp | Update C++ demo to use tracked wrappers for hands/head. |
| examples/oxr/cpp/oxr_session_sharing.cpp | Update session sharing demo to use tracked wrappers. |
| examples/lerobot/record.py | Update dataset recording example to use tracked wrappers and remove unused schema import. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
src/core/retargeting_engine/python/deviceio_source_nodes/hands_source.py
Show resolved
Hide resolved
1ba0936 to
7944724
Compare
Docs previewBuilt docs for this PR are available at: https://NVIDIA.github.io/IsaacTeleop/preview/pr-167/ (It may take a minute to appear after the workflow completes.) |
7944724 to
f770695
Compare
Docs previewBuilt docs for this PR are available at: https://NVIDIA.github.io/IsaacTeleop/preview/pr-167/ (It may take a minute to appear after the workflow completes.) |
src/core/retargeting_engine/python/deviceio_source_nodes/controllers_source.py
Outdated
Show resolved
Hide resolved
src/core/retargeting_engine/python/deviceio_source_nodes/controllers_source.py
Show resolved
Hide resolved
src/core/retargeting_engine/python/deviceio_source_nodes/controllers_source.py
Outdated
Show resolved
Hide resolved
7cda387 to
6f16255
Compare
f770695 to
3fde3cf
Compare
1b06930 to
2c38d46
Compare
Summary by CodeRabbit
API Changes
Impact